import Vue from 'vue'
import Router from 'vue-router'
import {routes} from './router'

Vue.use(Router);

//路由配置
export default new Router({
    routes: routes,
    //解决跳转后页面不置顶
    scrollBehavior(to,from,saveTop){
        if(saveTop){
            return saveTop;
        }else{
            return {x:0,y:0}
        }
    },
})
